<script setup lang="ts">
import topCate from './components/topCate.vue';
import { useRoute } from 'vue-router';
import banner from '../home/components/banner.vue';
import useStore from '@/store/index';
import secondGood from './components/secondGood.vue';
const cate = useStore().category;
const route = useRoute();
const id = route.params.id as string;
console.log(route, 'params');
</script>
<template>
  <div>
    <XtxBread>
      <XtxBreadItem to="/">首页</XtxBreadItem>
      <XtxBreadItem>{{ cate?.name }}</XtxBreadItem>
    </XtxBread>
    <banner></banner>
    <topCate :id="id"></topCate>

    <secondGood
      v-for="goods in cate.topSortList"
      :key="goods.id"
      :goods="goods"
    ></secondGood>
  </div>
</template>
<style lang="less"></style>
